
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type StoreServiceRecordRequest struct {

	UserId string `json:"user_id" form:"user_id"`

	ToUid string `json:"to_uid" form:"to_uid"`

	Nickname string `json:"nickname" form:"nickname"`

	Avatar string `json:"avatar" form:"avatar"`

	IsTourist string `json:"is_tourist" form:"is_tourist"`

	Online string `json:"online" form:"online"`

	Type string `json:"type" form:"type"`

	AddTime string `json:"add_time" form:"add_time"`

	UpdateTime string `json:"update_time" form:"update_time"`

	MssageNum string `json:"mssage_num" form:"mssage_num"`

	Message string `json:"message" form:"message"`

	MessageType string `json:"message_type" form:"message_type"`

}

func (r *StoreServiceRecordRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *StoreServiceRecordRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"user_id": "required",

		"to_uid": "required",

		"nickname": "required",

		"avatar": "required",

		"is_tourist": "required",

		"online": "required",

		"type": "required",

		"add_time": "required",

		"update_time": "required",

		"mssage_num": "required",

		"message": "required",

		"message_type": "required",

	}
}

func (r *StoreServiceRecordRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreServiceRecordRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreServiceRecordRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
